import request from "@/utils/request";

//储蓄卡列表
export function listCard(query) {
  return request({
    url: "/system/value/card/list",
    method: "get",
    params: query,
  });
}

//储蓄卡列表
export function getUser(query) {
  return request({
    url: "/system/zy/user/getUser", 
    method: "get",
    params: query,
  });
}
export function userCardList(query) {
  return request({
    url: "/system/value/card/userCardList",
    method: "get",
    params: query,
  });
}

/////// 获取退还价格
export function refundCardInfo(query) {
  return request({
    url: "/system/value/card/refundCardInfo",
    method: "get",
    params: query,
  });
}

/////////////////最终要退金额
export function refundCard(data) {
  return request({
    url: "/system/value/card/refundCard",
    method: "post",
    data: data,
  });
}

//规则列表
export function listCardRule(query) {
  return request({
    url: "/system/value/card/rule/list",
    method: "get",
    params: query,
  });
}

//会员卡详情
export function getCard(id) {
  return request({
    url: "/system/value/card/" + id,
    method: "get",
  });
}

export function getCardContinue(id) {
  return request({
    url: "/system/value/card/" + id,
    method: "get",
  });
}
// /system/member/continue/{id}

export function addCard(data) {
  return request({
    url: "/system/value/card",
    method: "post",
    data: data,
  });
}
export function addMemberContinueCard(data) {
  return request({
    url: "/system/value/card/continue",
    method: "post",
    data: data,
  });
}

export function updateCard(data) {
  return request({
    url: "/system/value/card",
    method: "put",
    data: data,
  });
}
export function listnormalList(query) {
  return request({
    url: "/system/technician/normalList",
    method: "get",
    params: query,
  });
}

export function delCard(id) {
  return request({
    url: "/system/value/card/" + id,
    method: "delete",
  });
}

export function listMemberRegion(query) {
  return request({
    url: "/system/region/addList",
    method: "get",
    params: query,
  });
}
export function listMemberStore(query) {
  return request({
    url: "/system/store/allList",
    method: "get",
    params: query,
  });
}
export function listMemberUser(query) {
  return request({
    url: "/system/zy/user/pcList",
    method: "get",
    params: query,
  });
}
